/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kmcsoft.goldshop.shop;

import com.kmcsoft.core.entity.Employee;
import com.kmcsoft.goldshop.model.master.Booth;
import com.kmcsoft.goldshop.model.master.Shop;
import com.kmcsoft.goldshop.shop.service.ShopService;
import com.kmcsoft.spring.SpringUtil;
import com.kmcsoft.zkex.Listbox;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zkplus.databind.AnnotateDataBinder;

/**
 *
 * @author kmcsoft02
 */
public class ViewBoothModal extends GenericForwardComposer{
    private AnnotateDataBinder binder;
    private Booth booth;
    @Autowired
    private ShopService service;

    @Override
    public void doAfterCompose(Component comp) throws Exception {
        super.doAfterCompose(comp);
        if (service == null) {
            service = SpringUtil.getBean("shopService", ShopService.class);
        }
        self.setAttribute("boothModal", this);
        booth = (Booth) arg.get("booth");
        binder = new AnnotateDataBinder(self);
        self.setAttribute("binder", binder);
        binder.loadAll();
    }

    public Booth getBooth() {
        return booth;
    }
    
}
